<extend name="Base/common"/>
<block name="header">
    <include file="Public/nav"/>
</block>
<block name="body">
    <!--模板详情-->
    <div class="container common-block templet">
        <ol class="breadcrumb">
            <li><a href="{:U('index/index')}">首页</a></li>
            <li><a href="{:U('my')}">开发者中心</a></li>
            <li class="active">控制面板</li>
        </ol>
        <include file="Admin/_info"/>
        <div class="col-md-2">

            <include file="_side"/>
        </div>


        <div class="col-md-10">


            <div class="col-md-12">

                <div class="second_nav" style="padding-bottom: 20px;">
                    <ul class="nav nav-secondary">
                        <li <if condition="$payed eq 0">class="active"</if> >
                            <a href="{:U('Admin/mygoods',array('payed'=>0))}">未付款</a>
                        </li>

                        <li <if condition="$payed eq 1">class="active"</if>>
                            <a href="{:U('Admin/mygoods',array('payed'=>1))}">已付款</a>
                        </li>


                    </ul>
                </div>

                <div class="panel panel-default">
                    <!-- Default panel contents -->
                    <div class="panel-heading">
                        拥有量 （{:count($order_list)}）
                        <div class="pull-right" style="margin: -3px;">
                            <form action="{:U('Appstore/Admin/incode')}" method="post">
                                <input name="code" placeholder="输入云码"
                                       style="border: 1px solid #C0C0C0;line-height: 24px;padding: 0 2px;word-break: normal;"/>
                                <button type="submit" class="btn btn-danger"
                                        style="padding: 2px 12px;margin: -4px 0 0 10px;">兑换
                                </button>
                            </form>
                        </div>
                    </div>
                    <table class="table">
                        <thead>
                        <tr>
                            <th>图标</th>
                            <th style="width: 200px;">名称</th>
                            <th>版本</th>
                            <th>最后更新</th>
                            <th>付款日期</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>

                        <volist name="order_list" id="vo">
                            <tr>
                                <td class="cover">{$vo.goods.cover|display_cover=60,60}</td>
                                <td><a target="_blank" href="{:U('index/goodsDetail',array('id'=>$vo['goods']['id']))}">{$vo.goods.title}</a>
                                </td>
                                <td>{$vo.goods.version.title}</td>
                                <td>{$vo.goods.update_time|date='Y-m-d H:i',###}</td>
                                <td>{$vo.pay_time|friendlyDate}</td>
                                <td>
                                    <div class="btn-group">
                                        <span style="width: 200px;display: inline-block;">{$vo.goods.version.id|display_download}</span>
                                    </div>
                                </td>
                            </tr>
                        </volist>
                    </table>
                    <div class="text-right" style="padding-right: 10px">{$selling.html}</div>
                </div>

            </div>

        </div>
    </div>
    <style>
        .cover {
            width: 60px;
            height: 60px;
            min-width: 60px;
        }
    </style>
</block>
